/**
 * @file     Exceptions.h
 * @brief    This header defines all titere exceptions
 *
 * @author   Franco Riberi
 * @email    fgriberi AT gmail.com
 *
 * Contents: Header file for titere providing system exceptions definitions.
 *
 * System:   titere: Target Ideal TEmperature Rna Expression
 * Language: C++
 *
 * @date     April 2014
 *
 * This file is part of titere.
 *
 * Copyright (C) 2014 - Franco Riberi, FuDePAN.
 *
 * titere is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * titere is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with titere. If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef TITERE_EXCEPTIONS_H
#define TITERE_EXCEPTIONS_H

#include <mili/mili.h>

namespace NSTitere
{

struct TitereExceptionHierarchy {};
typedef mili::GenericException<TitereExceptionHierarchy> TitereException;

//State exception
class StateException: public TitereException
{
public:
    StateException(const std::string& description): TitereException(description) {}
};

DEFINE_SPECIFIC_EXCEPTION_TEXT(InvalidPosition, TitereExceptionHierarchy, "Index is out of range");
DEFINE_SPECIFIC_EXCEPTION_TEXT(InvalidSize, TitereExceptionHierarchy, "Invalida amount of secondary structures");
DEFINE_SPECIFIC_EXCEPTION_TEXT(FileNotOpened, TitereExceptionHierarchy, "The file is not open");



} // namespace NSTitete

#endif /* TITERE_EXCEPTIONS_H */